package com._119yn.host.gst200.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.http.HttpStatus;


@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class Rs extends Rv {

    private String data;

    public static Rs data(String data) {
        return data(data, TIP_SUCCESS);
    }

    public static Rs data(String data, String msg) {
        Rs r = new Rs();
        r.setCode(HttpStatus.OK.value());
        r.setMsg(msg);
        r.setData(data);
        r.setTimestamp(System.currentTimeMillis());
        return r;
    }

}
